// 引入接口模块
import request from '@/utils/request'

// 获取阿里云上传图片凭证
export const aliyunImagUploadAddressAdnAuth = () => {
  return request({
    method: 'get',
    url: '/boss/course/upload/aliyunImagUploadAddressAdnAuth.json'
  })
}

// 获取阿里云上传视频凭证
export const aliyunVideoUploadAddressAdnAuth = params => {
  return request({
    method: 'get',
    url: '/boss/course/upload/aliyunVideoUploadAddressAdnAuth.json',
    params
  })
}

// 阿里云转码请求
export const aliyunTransCode = data => {
  return request({
    method: 'post',
    url: '/boss/course/upload/aliyunTransCode.json',
    data
  })
}

// 获取阿里云转码进度
export const aliyunTransCodePercent = lessonId => {
  return request({
    method: 'get',
    url: '/boss/course/upload/aliyunTransCodePercent.json',
    params: {
      lessonId
    }
  })
}
